package com.askyjt.videosearch.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author yangjintao
 * @since 2020-11-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Picture extends Model<Picture> {

    private static final long serialVersionUID = 1L;

    /**
     * milvus_id
     */
    @TableId(type = IdType.INPUT)
    private Long milvusId;

    /**
     * 图片地址
     */
    private String imageUrl;

    /**
     * 图片描述
     */
    private String imageDescription;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private Double distance;

    @TableLogic
    private Boolean delFlag;


    public static final String MILVUS_ID = "milvus_id";

    public static final String IMAGE_URL = "image_url";

    public static final String IMAGE_DESCRIPTION = "image_description";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DEL_FLAG = "del_flag";

    @Override
    protected Serializable pkVal() {
        return this.milvusId;
    }

}
